{{extend 'layout.html'}}

<div id='main_table' style="margin-left:auto; margin-right:auto; width:80%;">

	<table style="border:2px;width:100%;">
		<thead>
			<tr>				
					<th>
					<div class='module first'>
						<div class="hd">
							<h2>{{= T('Languages')}}</h2>
						</div>
					</div>
					</th>				
					<th>
						<div class='module first'>
						<div class="hd">
							<h2>{{= T('Projects')}}</h2>
						</div>
						</div>
					</th>
				
			</tr>
		</thead>				
		<tr>
			<td style="vertical-align: top">				
				<table>
					<thead>
						<tr>
							<th style="width: 80px">
								{{=T('Code')}}
							</th>
							<th style="width: 100px">
								{{=T('Description')}}
							</th>
							<th>
								{{=T('Overall Completion')}}
							</th>
						</tr>
					</thead>
						{{for i, lang in enumerate(languages):}}
							{{=TR(
									TD(A(lang.code, _href=URL('default/lang_and_prj', lang.code))), 
									TD(lang.description),
									TD(A(DIV(										
											DIV(_class='translated', _style='width:%spx;' %lang.percent),
											DIV(_class='untranslated', _style='left:%spx ;width:%spx;' %(lang.percent, (100-lang.percent))),
										    _class='graph', _dir='ltr'),
										    _title=T('%s%% completed' %lang.percent))) , 
										    _class='even' if not i%2 else 'odd')}}
						{{pass}}
				</table>									
			</td>			
			<td style="vertical-align: top">
				<div id='projects' class='hd'>
					<table>
						<thead>
							<tr>
								<th style="width: 80px">
									{{=T('Code')}}
								</th>
								<th style="width: 150px">
									{{=T('Description')}}
								</th>
								<th>
									{{=T('Overall Completion')}}
								</th>
							</tr>
						</thead>
						{{for i, prj in enumerate(projects):}}
							{{=TR(
								TD(A(prj.code, _href=URL('default/prj_and_lang', prj.code))),
								TD(prj.description),
								TD(
									A(DIV(
										DIV(_class='translated', _style='width:%spx;' %prj.percent),
										DIV(_class='untranslated', _style='left:%spx ;width:%spx;' %(prj.percent, (100-prj.percent))),
										_class='graph', _dir='ltr'),
										_title=T('%s%% completed' %prj.percent))), 
										_class='even' if not i%2 else 'odd')}}
						{{pass}}
					</table>
				</div>
			</td>
		</tr>
	</table>	
</div>